import type { ProfileParams, ProfileTypeItem } from '@/types/member'
import { http } from '@/utils/request'

/**
 * 获取个人信息
 */
export const getProfileAPI = () => {
  return http<ProfileTypeItem>({
    method: 'GET',
    url: '/member/profile'
  })
}

// 会员中心 - 个人信息
// 修改个人信息
// PUT / member / profile

export const putMemberProfileAPI = (data: ProfileParams) => {
  return http<ProfileParams>({
    url: '/member/profile',
    method: 'PUT',
    data
  })
}
